<?
global $base_dir;
$base_dir='../';

/**** 模块调用*****/
include_once($base_dir."inc/inc_connect.php");		//通用函数包含文件
include_once("index_inc.php");
include_once("func/function.php");
include_once($base_dir."inc/manage.php");			//后台通用包含文件
include_once($base_dir."adtype/api/ad_typeAPI.php");		//广告类别
?>
<?
//接收参数
if(is_array($_GET))
{
	foreach($_GET as $key => $value)
	{
		$$key=$value;
	}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$lanmu_name?>-后台管理系统</title>
<link href="../style/common.css" rel="stylesheet" type="text/css" />
<script src="../js/checkform.js" type="text/javascript"></script>
<script src="../js/jquery.js" type="text/javascript"></script>

<link href="../js/dq_calendar/dq_calendar.css" rel="stylesheet" type="text/css" />
<script src="../js/dq_calendar/dq_calendar.js" type="text/javascript"></script>

<script language="javascript">
//表单验证
function this_submit()
{
	if(checkform())
	{
		document.f1.submit();
	}
}

function checkAdSide()
{
	var adtype=document.getElementById("ad_site").value;
	$.get("AdSize_ajax.php",{id:adtype},function(data)
	{
		if(data!='')
		{
			var ary=data.split("|");
			document.getElementById('ad_width').value=ary[0];
			document.getElementById('ad_height').value=ary[1];
		}
	}
	)
}
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="lanmu_table">
  <tr>
    <td height="30" valign="bottom"><a href="<?=$url_list?>"><span class="lanmu_title"><?=$lanmu_name?></span></a><span class="lanmu_title2">&nbsp;&gt;&nbsp;添加</span></td>
  </tr>
</table>
<form action="<?=$url_act?>?<?=QueryString()?>" method="post" name="f1" enctype="multipart/form-data">
<table border="0" cellspacing="1" class="margintop30">
  <tr>
    <td width="114" height="25" align="right" class="title01">广告名称:</td>
    <td width="616" class="list_content1"><label><input name="ad_name" type="text" id="ad_name" bt="1" char="广告名称"/><span class="red">*</span>
    &nbsp;&nbsp;</label></td>
  </tr>  <tr>
    <td width="114" height="25" align="right" class="title01">广告位:</td>
    <td width="616" class="list_content1"><label><select name="ad_site" id="ad_site" bt="1" onchange="checkAdSide()">
	<option value="">请选择</option><?=getAdSiteList()?>
</select>

    &nbsp;&nbsp;</label></td>
  </tr>  <tr>
    <td width="114" height="25" align="right" class="title01">广告类别:</td>
    <td width="616" class="list_content1"><label><select name="ad_type" id="ad_type" bt="1" char="广告类别">
	<option value="">请选择</option>
	<option value="1">图片</option>
	<option value="2">flash</option>
	<option value="3">html代码</option>
</select>

    &nbsp;&nbsp;</label></td>
  </tr>  <tr>
    <td width="114" height="25" align="right" class="title01">html代码:</td>
    <td width="616" class="list_content1"><label><textarea name="ad_html" cols="40" id="ad_html" char="html代码"></textarea>
    &nbsp;&nbsp;</label></td>
  </tr>  <tr>
    <td width="114" height="25" align="right" class="title01">上传图片/flash:</td>
    <td width="616" class="list_content1"><label>网络地址:<input name="ad_path" type="text" id="ad_path"/><br />本地上传:<input name="upfile4" type="file" id="upfile4" />
    &nbsp;&nbsp;</label></td>
  </tr>  <tr>
    <td width="114" height="25" align="right" class="title01">宽:</td>
    <td width="616" class="list_content1"><label><input name="ad_width" type="text" id="ad_width" bt="1" char="宽"/><span class="red">*</span>
    &nbsp;&nbsp;</label></td>
  </tr>  <tr>
    <td width="114" height="25" align="right" class="title01">高:</td>
    <td width="616" class="list_content1"><label><input name="ad_height" type="text" id="ad_height" bt="1" char="高"/><span class="red">*</span>
    &nbsp;&nbsp;</label></td>
  </tr>  <tr>
    <td width="114" height="25" align="right" class="title01">广告链接:</td>
    <td width="616" class="list_content1"><label><input name="ad_url" type="text" id="ad_url" char="广告链接"/>
    &nbsp;&nbsp;</label></td>
  </tr>  <tr>
    <td width="114" height="25" align="right" class="title01">开始日期:</td>
    <td width="616" class="list_content1"><label><input name="ad_starttime" type="text" id="ad_starttime" bt="1" char="开始日期" onclick="DQ_setDate(this)"/><span class="red">*</span>
    &nbsp;&nbsp;</label></td>
  </tr>  <tr>
    <td width="114" height="25" align="right" class="title01">结束日期:</td>
    <td width="616" class="list_content1"><label><input name="ad_endtime" type="text" id="ad_endtime" bt="1" char="结束日期" onclick="DQ_setDate(this)"/><span class="red">*</span>
    &nbsp;&nbsp;</label></td>
  </tr>  <tr>
    <td width="114" height="25" align="right" class="title01">备注:</td>
    <td width="616" class="list_content1"><label><textarea name="beizhu" cols="40" id="beizhu" char="备注"></textarea>
    &nbsp;&nbsp;</label></td>
  </tr><input name="admin_id" type="hidden" id="admin_id" char="管理员编号"/>
  <tr>
    <td height="25" colspan="2" align="center" class="list_content1">
      <input type="button" name="Submit2" value="提交" onclick="this_submit()" />
      &nbsp;&nbsp;
      <input name="reset" type="reset" value="重填" />
      <input name="act" type="hidden" id="act" value="save" />    </td>
  </tr>
</table>
</form>
<!-- 7caihu.com Baidu tongji analytics -->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fb8797ecb21d1ccb839c35b190277a0cd' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>
<?
include_once($base_dir."inc/inc_unconnect.php")
?>